package com.baliejun.springsell.util;

import com.baliejun.springsell.viewbean.ResultVO;

/**
 * @Author: LiejunBa
 * @Description:
 * @Date: 2020/12/5 3:25 下午
 */
public class ResultVOUtil {

    public static ResultVO success(Object object){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(object);

        return resultVO;
    }

    public static ResultVO success(){

        return success(null);
    }

    public static ResultVO error(Object object){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(1);
        resultVO.setMsg("失败");
        resultVO.setData(object);

        return resultVO;
    }

}
